import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: () => import('../page/login/login')
    },
    {
      path: '/login',
      component: () => import('../page/login/login')
    },
    {
      path: '/addUser',
      component: () => import('../page/shop/user/addUser.vue')
    },
    {
      path: '/addGuest',
      component: () => import('../page/shop/guest/addGuest.vue')
    },
    {
      path: '/editSubject',
      component: () => import('../page/shop/subject/editSubject.vue')
    },
    {
      path: '/editGoods',
      component: () => import('../page/shop/goods/editGoods.vue')
    },
    {
      path: '/cardInfo',
      component: () => import('../page/shop/card/cardInfo.vue')
    },
    {
      path: '/addAccount',
      component: () => import('../page/shop/account/addAccount.vue')
    },
    {
      path: '/addCost',
      component: () => import('../page/shop/cost/addCost.vue')
    },
    {
      path: '/addRule',
      component: () => import('../page/shop/rule/addRule.vue')
    },
    {
      path: '/addAdmin',
      component: () => import('../page/shop/rule/addAdmin.vue')
    },
    {
      path: '/editAdmin',
      component: () => import('../page/shop/admin/editAdmin.vue')
    },
    {
      path: '/changePassword',
      component: () => import('../page/shop/admin/changePassword.vue')
    },
    {
      path: '/addFactory',
      component: () => import('../page/shop/factory/addFactory.vue')
    },
    {
      path: '/addBrand',
      component: () => import('../page/shop/brand/addBrand.vue')
    },
    {
      path: '/openFactoryList',
      component: () => import('../page/shop/factory/openFactoryList.vue')
    },
    {
      path: '/openAddShopGoods',
      component: () => import('../page/shop/goods/openAddShopGoods.vue')
    },
    {
      path: '/openGoodsCategoryList',
      component: () => import('../page/shop/goods/goodsCategoryList.vue')
    },
    {
      path: '/openBrandList',
      component: () => import('../page/shop/goods/openBrandList.vue')
    },
    {
      path: '/guestDetail',
      component: () => import('../page/shop/guest/guestDetail.vue')
    },
    {
      path: '/allotGuest',
      component: () => import('../page/shop/guest/allotGuest.vue')
    },
    {
      path: '/editGuestInitial',
      component: () => import('../page/shop/guest/editGuestInitial.vue')
    },
    {
      path: '/pullSubject',
      component: () => import('../page/shop/subject/pullSubject.vue')
    },
    {
      path: '/pullGoods',
      component: () => import('../page/shop/goods/pullGoods.vue')
    },
    {
      path: '/addCard',
      component: () => import('../page/shop/card/addCard.vue')
    },
    {
      path: '/selectSubject',
      component: () => import('../page/shop/popup/selectSubject.vue')
    },
    {
      path: '/addOpenCard',
      component: () => import('../page/shop/opencard/addOpenCard.vue')
    },
    {
      path: '/selectOpenCardRowType',
      component: () => import('../page/shop/popup/selectOpenCardRowType.vue')
    },
    {
      path: '/goodsPopup',
      component: () => import('../page/shop/popup/goodsPopup.vue')
    },
    {
      path: '/subjectPopup',
      component: () => import('../page/shop/popup/subjectPopup.vue')
    },
    {
      path: '/cardsPopup',
      component: () => import('../page/shop/popup/cardsPopup.vue')
    },
    {
      path: '/accountPopup',
      component: () => import('../page/shop/popup/accountPopup.vue')
    },
    {
      path: '/userPopup',
      component: () => import('../page/shop/popup/userPopup.vue')
    },
    {
      path: '/selectAppUser',
      component: () => import('../page/shop/popup/selectAppUser.vue')
    },
    {
      path: '/openOrder',
      component: () => import('../page/shop/order/openOrder.vue')
    },
    {
      path: '/rechargeOrder',
      component: () => import('../page/shop/recharge/rechargeOrder.vue')
    },
    {
      path: '/backCard',
      component: () => import('../page/shop/backCard/backCard.vue')
    },
    {
      path: '/selectGuestCard',
      component: () => import('../page/shop/backCard/selectGuestCard.vue')
    },
    {
      path: '/checkBackCard',
      component: () => import('../page/shop/backCard/checkBackCard.vue')
    },
    {
      path: '/backCardInfo',
      component: () => import('../page/shop/backCard/backCardInfo.vue')
    },
    {
      path: '/backAccount',
      component: () => import('../page/shop/backCard/backAccount.vue')
    },
    {
      path: '/accountInfo',
      component: () => import('../page/shop/account/accountInfo.vue')
    },
    {
      path: '/userSalary',
      component: () => import('../page/shop/userPay/userSalary.vue')
    },
    {
      path: '/costType',
      component: () => import('../page/shop/cost/costType.vue')
    },
    {
      path: '/moneyInfo',
      component: () => import('../page/shop/money/moneyInfo.vue')
    },
    {
      path: '/editGrade',
      component: () => import('../page/shop/rule/editGrade.vue')
    },
    {
      path: '/selectGrade',
      component: () => import('../page/shop/rule/selectGrade.vue')
    },
    {
      path: '/addPickOrder',
      component: () => import('../page/shop/pick/addPickOrder.vue')
    },
    {
      path: '/selectStaff',
      component: () => import('../page/shop/popup/selectStaff.vue')
    },
    {
      path: '/selectGoods',
      component: () => import('../page/shop/popup/selectGoods.vue')
    },
    {
      path: '/pickOrderInfo',
      component: () => import('../page/shop/pick/pickOrderInfo.vue')
    },
    {
      path: '/addStockOrder',
      component: () => import('../page/shop/stock/addStockOrder.vue')
    },
    {
      path: '/stockOrderInfo',
      component: () => import('../page/shop/stock/stockOrderInfo.vue')
    },
    {
      path: '/selectDepartment',
      component: () => import('../page/shop/user/selectDepartment.vue')
    },
    {
      path: '/guestSubjectPopup',
      component: () => import('../page/shop/popup/guestSubjectPopup.vue')
    },
    {
      path: '/guestStorePopup',
      component: () => import('../page/shop/popup/guestStorePopup.vue')
    },
    {
      path: '/backGround',
      component: () => import('../page/backGround.vue')
    },
    {
      path: '/printOpenCard',
      component: () => import('../page/print/printOpenCard.vue')
    },
    {
      path: '/printRechargeOrder',
      component: () => import('../page/print/printRechargeOrder.vue')
    },
    {
      path: '/printOpenOrder',
      component: () => import('../page/print/printOpenOrder.vue')
    },
    {
      path: '/setting',
      component: () => import('../page/setting/setting.vue')
    },
    {
      path: '/settlement',
      name: 'settlement',
      component: () => import('../page/settlement/settlement.vue'),
      meta: {
        keepAlive: false
      }
    },
    {
      path: '/currFeat',
      name: 'currFeat',
      component: () => import('../page/settlement/current/currFeat.vue'),
      meta: {
        keepAlive: true
      }
    },
    {
      path: '/guest',
      component: () => import('../page/guest/guest'),
      children: [
        {
          path: 'index',
          component: () => import('../page/guest/children/info')
        },
        {
          path: 'accountMessage',
          component: () => import('../page/guest/children/accountMessage')
        },
        {
          path: 'guestLog',
          component: () => import('../page/guest/children/guestLog')
        },
        {
          path: 'other',
          component: () => import('../page/guest/children/other')
        }
      ]
    },
    {
      path: '/crossShop',
      component: () => import('../page/guest/children/crossShop')
    },
    {
      path: '/shop',
      component: () => import('../page/shop/shop'),
      children: [
        {
          path: '',
          component: () => import('../page/shop/main')
        },
        {
          path: 'bumenList',
          component: () => import('../page/shop/bumen/bumenList.vue')
        },
        {
          path: 'userList',
          component: () => import('../page/shop/user/userList.vue')
        },
        {
          path: 'guestList',
          component: () => import('../page/shop/guest/guestList.vue')
        },
        {
          path: 'guestAppoint',
          component: () => import('../page/shop/guest/guestAppoint.vue')
        },
        {
          path: 'subjectList',
          component: () => import('../page/shop/subject/subjectList.vue')
        },
        {
          path: 'goodsList',
          component: () => import('../page/shop/goods/goodsList.vue')
        },
        {
          path: 'cardList',
          component: () => import('../page/shop/card/cardList.vue')
        },
        {
          path: 'openCardList',
          component: () => import('../page/shop/openCard/openCardList.vue')
        },
        {
          path: 'orderList',
          component: () => import('../page/shop/order/orderList.vue')
        },
        {
          path: 'rechargeList',
          component: () => import('../page/shop/recharge/rechargeList.vue')
        },
        {
          path: 'debtList',
          component: () => import('../page/shop/debt/debtList.vue')
        },
        {
          path: 'backCardList',
          component: () => import('../page/shop/backcard/backCardList.vue')
        },
        {
          path: 'accountList',
          component: () => import('../page/shop/account/accountList.vue')
        },
        {
          path: 'checkList',
          component: () => import('../page/shop/check/checkList.vue')
        },
        {
          path: 'backCheckList',
          component: () => import('../page/shop/check/backCheckList.vue')
        },
        {
          path: 'userPayList',
          component: () => import('../page/shop/userPay/userPayList.vue')
        },
        {
          path: 'costList',
          component: () => import('../page/shop/cost/costList.vue')
        },
        {
          path: 'moneyList',
          component: () => import('../page/shop/money/moneyList.vue')
        },
        {
          path: 'featList',
          component: () => import('../page/shop/feat/featList.vue')
        },
        {
          path: 'stockList',
          component: () => import('../page/shop/stock/stockList.vue')
        },
        {
          path: 'pickList',
          component: () => import('../page/shop/pick/pickList.vue')
        },
        {
          path: 'stockLog',
          component: () => import('../page/shop/stock/stockLog.vue')
        },
        {
          path: 'permissionLevel',
          component: () => import('../page/shop/rule/permissionLevel.vue')
        },
        {
          path: 'adminRule',
          component: () => import('../page/shop/rule/adminRule.vue')
        },
        {
          path: 'erWeiMa',
          component: () => import('../page/shop/base/erWeiMa.vue')
        },
        {
          path: 'factoryList',
          component: () => import('../page/shop/factory/factoryList.vue')
        },
        {
          path: 'brandList',
          component: () => import('../page/shop/brand/brandList.vue')
        },
        {
          path: 'shopGoodsList',
          component: () => import('../page/shop/goods/shopGoodsList.vue')
        },
        {
          path: 'otherShopFeat',
          component: () => import('../page/shop/feat/otherShopFeat.vue')
        },
        {
          path: 'subjectFeat',
          component: () => import('../page/shop/feat/subjectFeat.vue')
        }
      ]
    },
    {
      path: '/organization',
      component: () => import('../page/organization/organization'),
      children: [
        {
          path: '',
          component: () => import('../page/organization/shop/shopList.vue')
        },
        {
          path: 'positionList',
          component: () => import('../page/organization/position/positionList.vue')
        },
        {
          path: 'userList2',
          component: () => import('../page/organization/user/userList.vue')
        },
        {
          path: 'shopList',
          component: () => import('../page/organization/shop/shopList.vue')
        },
        {
          path: 'brandList',
          component: () => import('../page/organization/brand/brandList.vue')
        },
        {
          path: 'factoryList',
          component: () => import('../page/organization/factory/factoryList.vue')
        },
        {
          path: 'categorylist',
          component: () => import('../page/organization/category/categorylist.vue')
        },
        {
          path: 'goodsList',
          component: () => import('../page/organization/goods/goodsList.vue')
        },
        {
          path: 'subjectList2',
          component: () => import('../page/organization/subject/subjectList.vue')
        },
        {
          path: 'vipgradeList',
          component: () => import('../page/organization/vipgRade/vipgradeList.vue')
        },
        {
          path: 'guestCategoryList',
          component: () => import('../page/organization/basis/guestCategoryList.vue')
        },
        {
          path: 'guestThreephase',
          component: () => import('../page/organization/basis/guestThreephase.vue')
        },
        {
          path: 'subprochildclassList',
          component: () => import('../page/organization/subprochildclass/subprochildclassList.vue')
        },
        {
          path: 'diagnosisList',
          component: () => import('../page/organization/diagnosis/diagnosisList.vue')
        },
        {
          path: 'groupAdminlist',
          component: () => import('../page/organization/group/groupAdminlist.vue')
        },
        {
          path: 'stockList',
          component: () => import('../page/organization/stock/stockList.vue')
        },
        {
          path: 'stockGoodslist',
          component: () => import('../page/organization/stock/stockGoodslist.vue')
        },
        {
          path: 'orderList',
          component: () => import('../page/organization/order/orderList.vue')
        },
        {
          path: 'permissionLevel/:type',
          component: () => import('../page/organization/rule/permissionLevel.vue')
        },
        {
          path: 'weiXinSetting',
          component: () => import('../page/organization/basis/weiXinSetting.vue')
        }
      ]
    },
    {
      path: '/addUser2',
      component: () => import('../page/organization/user/addUser.vue')
    },
    {
      path: '/addchildclass',
      component: () => import('../page/organization/subprochildclass/addchildclass.vue')
    },
    {
      path: '/addPosition',
      component: () => import('../page/organization/user/addPosition.vue')
    },
    {
      path: '/adminChangepas',
      component: () => import('../page/organization/admin/adminChangepas.vue')
    },
    {
      path: '/adminEdit',
      component: () => import('../page/organization/admin/adminEdit.vue')
    },
    {
      path: '/positionAdd',
      component: () => import('../page/organization/position/positionAdd.vue')
    },
    {
      path: '/selectDepartment2',
      component: () => import('../page/organization/user/selectDepartment.vue')
    },
    {
      path: '/shopadminEdit',
      component: () => import('../page/organization/shop/adminList.vue')
    },
    {
      path: '/addShop',
      component: () => import('../page/organization/shop/addShop.vue')
    },
    {
      path: '/addShopAdmin',
      component: () => import('../page/organization/shop/addAdmin.vue')
    },
    {
      path: '/addBrand2',
      component: () => import('../page/organization/brand/addBrand.vue')
    },
    {
      path: '/addFactory2',
      component: () => import('../page/organization/factory/addFactory.vue')
    },
    {
      path: '/editGoods2',
      component: () => import('../page/organization/goods/editGoods.vue')
    },
    {
      path: '/editSubject2',
      component: () => import('../page/organization/subject/editSubject.vue')
    },
    {
      path: '/popupGoodsList',
      component: () => import('../page/organization/popup/goodsList.vue')
    },
    {
      path: '/selectPopupBrand',
      component: () => import('../page/organization/popup/selectbrand.vue')
    },
    {
      path: '/selectPopupCategory',
      component: () => import('../page/organization/popup/selectcategory.vue')
    },
    {
      path: '/selectPopupFactory',
      component: () => import('../page/organization/popup/selectfactory.vue')
    },
    {
      path: '/addVipgrade',
      component: () => import('../page/organization/vipgRade/addVipgrade.vue')
    },
    {
      path: '/guestcategoryEdit',
      component: () => import('../page/organization/basis/guestcategoryEdit.vue')
    },
    {
      path: '/addDiagnose',
      component: () => import('../page/organization/diagnosis/addDiagnose.vue')
    },
    {
      path: '/addDiagnosisOption',
      component: () => import('../page/organization/diagnosis/addDiagnosisOption.vue')
    },
    {
      path: '/groupSelectgrade',
      component: () => import('../page/organization/group/groupSelectgrade.vue')
    },
    {
      path: '/groupAdd',
      component: () => import('../page/organization/group/groupAdd.vue')
    },
    {
      path: '/addStockorder2',
      component: () => import('../page/organization/stock/addStockorder.vue')
    },
    {
      path: '/stockOrderinfo2',
      component: () => import('../page/organization/stock/stockOrderinfo.vue')
    },
    {
      path: '/editOrder',
      component: () => import('../page/organization/order/editOrder.vue')
    },
    {
      path: '/editRule',
      component: () => import('../page/organization/rule/editRule.vue')
    },
    {
      path: '/ruleFloorpermission',
      component: () => import('../page/organization/rule/ruleFloorpermission.vue')
    },
    {
      path: '/addotherPermission',
      component: () => import('../page/organization/rule/addotherPermission.vue')
    },
    {
      path: '/employee',
      component: () => import('../page/employee/employee'),
      children: [
        {
          path: 'index',
          name: 'employeeIndex',
          component: () => import('../page/employee/children/info')
        },
        {
          path: 'yeji',
          name: 'employeeYeji',
          component: () => import('../page/employee/children/yejiInfo')
        },
        {
          path: 'pay',
          name: 'employeePay',
          component: () => import('../page/employee/children/payInfo')
        }
      ]
    },
    {
      path: '/liveMessage',
      component: () => import('../page/shop/admin/liveMessage.vue')
    },
    {
      path: '/miniProgram',
      component: () => import('../page/miniprogram/index.vue'),
      children: [
        {
          path: '',
          component: () => import('../page/miniprogram/setting/index')
        },
        {
          path: 'article',
          component: () => import('../page/miniprogram/article/articleList')
        },
        {
          path: 'setting',
          component: () => import('../page/miniprogram/setting/index')
        }
      ]
    },
    {
      path: '/addArticle',
      component: () => import('../page/miniprogram/article/addArticle')
    },
    {
      path: '/selectArticle',
      component: () => import('../page/miniprogram/article/selectArticle')
    },
    {
      path: '/editSubjectInfo',
      component: () => import('../page/organization/subject/editSubjectInfo')
    },
    {
      path: '/editGoodsInfo',
      component: () => import('../page/organization/goods/editGoodsInfo')
    },
    {
      path: '/orgMiniProgram',
      component: () => import('../page/organization/miniprogram/index.vue'),
      children: [
        {
          path: '',
          component: () => import('../page/organization/miniprogram/article/articleList')
        },
        {
          path: 'article',
          component: () => import('../page/organization/miniprogram/article/articleList')
        },
        {
          path: 'setting',
          component: () => import('../page/organization/miniprogram/setting/index')
        }
      ]
    }
  ]
})
